import request from '@/utils/request'

export function fetchList(data) {
  return request({
    url: '/settle/cnzz/index.html',
    method: 'post',
    data
  })
}

export function fetchDaili() {
  return request({
    url: '/settle/index/get_all_agent',
    method: 'get'
  })
}

export function create(data) {
  return request({
    url: '/settle/cnzz/add_user.html',
    method: 'post',
    data
  })
}

export function update(data) {
  return request({
    url: '/settle/cnzz/update_user',
    method: 'post',
    data
  })
}

export function stopQudao(data) {
  return request({
    url: '/settle/cnzz/stop_user.html',
    method: 'post',
    data
  })
}

export function openQudao(data) {
  return request({
    url: '/settle/cnzz/open_user.html',
    method: 'post',
    data
  })
}

export function fetchLink(data) {
  return request({
    url: '/settle/cnzz/get_cnzz_channel_code',
    method: 'post',
    data
  })
}

export function fetchSearch(data) {
  return request({
    url: '/settle/cnzz/open_url_list',
    method: 'post',
    data
  })
}

// export function fetchOne(id) {
//   return request({
//     url: '/admin/user/edit/id/' + id + '.html',
//     method: 'get'
//   })
// }

// export function runType(id) {
//   return request({
//     url: '/admin/user/cancelban/id/' + id + '.html',
//     method: 'get'
//   })
// }

// export function stopType(id) {
//   return request({
//     url: '/admin/user/ban/id/' + id + '.html',
//     method: 'get'
//   })
// }

// export function quickLogin(id) {
//   return request({
//     url: '/admin/user/quick_logon/id/' + id + '.html',
//     method: 'get'
//   })
// }
